


clear all
set more off
capture log close

set seed 532020 // Seed for LASSO regression

**************************set filepath here*************************************

global filepath "/Users/`c(username)'/Dropbox/CoronaImpacts/Replication files"

*********************set subdirectories automatically **************************

global data  	"$filepath/data"
global temp 	"$data/temp/" // This is where temporary data files are stored
global dofiles  "$filepath/do-files"
global ado  "$filepath/do-files/ado"
global output  	"$filepath/output"
global tables  	"$filepath/output/tables"
global figures  "$filepath/output/figures"

*********************** Start log file *****************************************
cap log close
log using "$dofiles/economic_anxiety_logfile", replace

*********************set path to ado-file folder here***************************
adopath ++ "$ado/"

********************************************************************************
**********************generate the final datasets*******************************
********************************************************************************


*There are the following data-generating do-files.*

do "$dofiles/cleaning/clean_survey1.do"
do "$dofiles/cleaning/clean_survey2.do" 


********************************************************************************
********************************************************************************
**********************Generate outputs *****************************************
********************************************************************************
********************************************************************************

********************************************************************************
**********************Tables and Raw output for Figures ************************
********************************************************************************

* Table A1 was created manually
do "$dofiles/tables/table_A2.do"
do "$dofiles/tables/table_A3.do"
do "$dofiles/tables/table_A4.do"
do "$dofiles/tables/table_A5.do"
do "$dofiles/tables/table_A6.do"
do "$dofiles/tables/table_A7.do" 
do "$dofiles/tables/table_A8.do" // Data needs to be downloaded externally
do "$dofiles/tables/table_A9.do"
do "$dofiles/tables/table_A10.do"
do "$dofiles/tables/table_A11.do" 
do "$dofiles/tables/table_A12.do" 
do "$dofiles/tables/table_A13.do"
do "$dofiles/tables/table_A14.do"
do "$dofiles/tables/table_A15.do"
do "$dofiles/tables/table_A16.do"
do "$dofiles/tables/table_A17.do"
do "$dofiles/tables/table_A18.do"
do "$dofiles/tables/table_A19.do"


/* Figures (figuers are plotted in Python using "figures.ipynb). 
The following do-files generate the raw data that are used in the python code.
Figure directly based on tables are based on raw data created in the table do-files above */

do "$dofiles/figures/Figure_3D.do"
do "$dofiles/figures/Figure_4C.do"
do "$dofiles/figures/Figures_A2A3.do"
do "$dofiles/figures/Figure_A4.do"
do "$dofiles/figures/Figure_A7.do"
do "$dofiles/figures/Figure_A8.do"


********************************************************************************
********************************************************************************
********************************************************************************
log close
